package cn.gs.util.stream;

// @author gs

import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;


public class Replace {
    
    public static void main(String[] args) throws IOException {
        //orgfile dstfile orgword dstword
        String all=StringStreamUtil.getString(new FileReader(args[0]));
        all=all.replace(args[2], args[3]);
        PrintWriter pw = new PrintWriter(args[1]);
        pw.print(all);
        pw.close();
    }
}
